//
//  XMSDemo1Controller.m
//  XMSimonUtils_Example
//
//  Created by 徐盟 on 2023/3/17.
//  Copyright © 2023 xumeng. All rights reserved.
//

#import "XMSLoggerController.h"

@interface XMSLoggerController ()
{
    XMLogger * _logger;
}

@end

@implementation XMSLoggerController

- (void)viewDidLoad {
    [super viewDidLoad];
  
    // Do any additional setup after loading the view.
}

+ (NSArray<NSDictionary *> *)getItemDicts
{
    NSArray<NSDictionary *> * dicts = @[
        @{@"name":@"-log", @"action": @"test1"},
        @{@"name":@"+log", @"action": @"test2"},
        @{@"name":@"链式调用log", @"action": @"test3"},
        @{@"name":@"_logger", @"action": @"test4"},
    ];
    
    return  dicts;
}


-(void) test1
{
    [self.logger log:@"test1 -log， 测试成功"];
    
    
}
-(void) test2
{
    [XMLogger log:@"test1 +log， 测试成功"];
    
}
-(void) test3
{
    self.logger.log(@"test3 链式调用 self.logger.log， 参数：%@,测试成功", @"哈哈哈");
    self.log(@"test3 链式调用 self.log， 参数：%@,测试成功", @"呵呵");
}

-(void) test4
{
    [self.logger log:@"test4"];
    _logger = self.logger;
    _logger.log(@"test4 _logger, 测试成功");
}

- (void)dealloc
{
    self.log(@"dealloc");
}
@end
